<template>
  <div>
    <div class="item" v-for="(item, index) of list" :key="index">
      <div class="item-title border-bottom">
        <span class="item-title-icon"></span>
        {{item.title}}
      </div>
      <div v-if="item.children" class="item-children">
        <detail-list :list="item.children"></detail-list>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'DetailList',
  props: {
    list: Array
  }
}
</script>

<style lang="stylus" scoped>
  .item-title
    line-height 3.0rem
    font-size 1.14rem
    padding 0 .4rem
    .item-title-icon
      position relative
      left .2rem
      top 0.3rem
      display inline-block
      width: 22px;
      height: 22px;
      background: url(http://source.qunarzz.com/site/images/wap/touch/images/v2/images2x/nav_7.png) 0 0 no-repeat;
      background-size: 175px 50px;
  .item-children
    padding 0 .9rem
</style>
